<template>
  <view class="flex flex-column u-m-b-30 rounded-10 box-shadow bg-white" style="width: 330rpx;" @click="toDetail">
		<u-image :src="item.images" width="330rpx" height="330rpx" borderRadius="10"></u-image>
		<view class="" style="height: 90rpx;">
			<text class="u-p-x-16 u-p-t-10 font-26 text-ellipsis-2" >{{item.goods_name}}</text>
		</view>
    <view class="flex align-center justify-between u-m-14" style="height: 30rpx;line-height: 30rpx;">
			<view class="flex align-center">
				<text class="font-30 text-danger">¥{{item.goods_price}}</text>
			</view>
      <text class="font-sm text-greey">已售{{item.sale}}件</text>
    </view>
  </view>
</template>

<script>
	export default {
		name:"dy-goods-item",
    props:{
      item:{
        type: Object,
        default() {
          return {}
        }
      }
    },
    methods: {
      toDetail() {
        uni.navigateTo({
          url:'/pages/goodsDetail/commonGoodsDetail/commonGoodsDetail?goods_id='+ this.item.goods_id
        })
      }
    }
	}
</script>

<style lang="scss" scoped>

</style>
